import React, { Component } from 'react';
import { NavLink } from 'react-router-dom';
import Routerview from '../../router/routerView';
class Index extends Component {
  render() {
    const { routes } = this.props
    return (
      <div>
        <div style={{ height: '94vh', overflow: 'scroll' }}>
          <Routerview routes={routes}></Routerview>
        </div>
        <div style={{ display: 'flex', justifyContent: 'space-around', height: '6vh', alignItems:'center' }}>
          {
            routes.length > 0 && routes.map((v, i) => {
              return <NavLink to={ v.path } key={i}>{v.title}</NavLink>
            })
          }
        </div>
      </div>
    );
  }
}

export default Index;
